<jsp:include page="data?view=food&action=list" />
<h2>Food Management</h2>
<p><a href="index.jsp?style=add&act=food">New Food</a></p>
<c:if test="${not empty requestScope.foods}">
    <table cellpadding="5" cellspacing="5">
        <tbody>
            <tr>
                <th>ID</th>
                <th>Name</th>
                <th>Price</th>
                <th>Description</th>
                <th></th>
            </tr>
        <c:forEach items="${requestScope.foods}" var="food">
            <tr>
                <td><a href="?style=detail&act=food&id=${food.id}">${food.id}</a></td>
                <td>${food.name}</td>
                <td>$${food.price}</td>
                <td>${food.description}</td>
                <td><a href="#" onclick="confirmDelete('food', ${food.id})">Delete</a></td>
            </tr>
        </c:forEach>
        </tbody>
    </table>
</c:if>
<c:if test="${empty requestScope.foods}">
    No food found
</c:if>
<hr />
